﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Linq;
using System.Text;

namespace TreeBuilder
{
    public class SizeChangedAction : UndoableAction
    {
        public Size OldSize { get; private set; }
        public Size NewSize { get; private set; }
        public NodeFrame Frame { get; private set; }

        public SizeChangedAction(NodeFrame frame, Size oldSize, Size newSize)
        {
            OldSize = oldSize;
            NewSize = newSize;
            Frame = frame;
        }

        public override void Execute()
        {
            Frame.Size = NewSize;
        }

        public override void Undo()
        {
            Frame.Size = OldSize;
        }
    }
}
